In the computing industry, it is quite common to transfer data and commands between a plurality of data processing devices, such as computers, printers, displays, terminals, and other network resources. Local Area Networks (LANs) allow the transfer of data between a localized set of computing and peripheral devices, typically in the same geographical area such as one building or a plurality of buildings closely situated together. Examples of such LANs may be found in U.S. Pat. Nos. 4,063,220, 4,661,902, and 4,689,786.
In the AppleTalk.RTM. (a trademark of Apple Computer, Inc.) network system, each "node" or computer, printer, peripheral, and other network resources share resources with a file server. The file server includes two main AppleTalk protocols called the AppleTalk Filing Protocol (AFP), AppleTalk Session Protocol (ASP), and the operating system of the file server includes the AppleTalk Transaction Protocol (ATP). The AFP is a protocol dealing with issues that are file system related. The AFP uses the ASP to receive file system requests from network entities and to send responses back to the entities. The request and responses may be partitioned into smaller data packets and the ASP uses the ATP to send and receive these data packets over the network.
The ASP is a protocol for maintaining network sessions between the file server and the network entities. A session is opened once an entity establishes communication with the server. The ASP keeps information about the entity in a session object. In addition, a corresponding session is opened in the AFP for that entity with different information. When the ASP receives an ASP request from the network, the ASP passes the request to the AFP for processing.
To improve the processing performance of the file server, the file server is implemented as a multithreaded process. Network tasks are broken into sub-tasks and assigned to individual threads for further processing. Each thread of execution has its own stack and therefore requires more memory. Conventional methods for assigning the threads to the AFP sessions require more threads than necessary based upon the number of AFP sessions and do not guarantee that each AFP session will receive its share of processing time.
What is needed therefore is a method for assigning threads to AFP sessions in a manner that is efficient, requires less threads and system resources, and provides each AFP session with equal processing time. The present invention addresses such a need.